home *** CD-ROM | disk | FTP | other *** search
/ PC World 2007 January / PCWorld_2007-01_cd.bin / v cisle / autoit / autoit-v3.2.0.1-setup.exe / Examples / Helpfile / _GUICtrlComboSetItemHeight.au3 < prev    next >
Text File  |  2006-06-17  |  754b  |  30 lines

  1. #include <GuiConstants.au3>
  2. #include <GuiCombo.au3>
  3.  
  4. Opt ('MustDeclareVars', 1)
  5.  
  6. Dim $Height = 25, $Btn_Set, $Combo, $Btn_Exit, $msg, $ret
  7.  
  8. GUICreate("ComboBox Set Item Height", 392, 254)
  9.  
  10. $Combo = GUICtrlCreateCombo("", 70, 10, 270, 120)
  11. GUICtrlSetData($Combo, "AutoIt|v3|is|freeware|BASIC-like|scripting|language")
  12. $Btn_Set = GUICtrlCreateButton("Set", 150, 140, 90, 30)
  13. $Btn_Exit = GUICtrlCreateButton("Exit", 150, 180, 90, 30)
  14. GUISetState()
  15. While 1
  16.     $msg = GUIGetMsg()
  17.     Select
  18.         Case $msg = $GUI_EVENT_CLOSE Or $msg = $Btn_Exit
  19.             ExitLoop
  20.         Case $msg = $Btn_Set
  21.             $ret = _GUICtrlComboSetItemHeight ($Combo, -1, $Height)
  22.             If ($Height == 25) Then
  23.                 $Height = 15
  24.             Else
  25.                 $Height = 25
  26.             EndIf
  27.     EndSelect
  28. WEnd
  29. Exit
  30.